﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eassets.Layered.Domain.Global;
using Eassets.Data.Global;
using System.Collections.ObjectModel;

namespace Eassets.Service.Global
{
    public class AuthorizationGroupService
    {
        AuthorizationGroupData authorizationGroupdata = new AuthorizationGroupData();

        /// <summary>
        /// Inserts authorizationGroup.
        /// </summary>
        /// <param name="authorizationGroup"></param>
        public void AddAuthorizationGroup(AuthorizationGroup authorizationGroup)
        {
            if (authorizationGroup != null)
            {
                authorizationGroupdata.AddAuthorizationGroup(authorizationGroup);
            }
        }

        /// <summary>
        /// Updates authorizationGroup.
        /// </summary>
        /// <param name="authorizationGroup"></param>
        public void ModifyAuthorizationGroup(AuthorizationGroup authorizationGroup)
        {
            if (authorizationGroup != null)
            {
                authorizationGroupdata.ModifyAuthorizationGroup(authorizationGroup);
            }
        }

        /// <summary>
        /// Delete authorizationGroup.
        /// </summary>
        /// <param name="authorizationGroupId"></param>
        public void DeleteAuthorizationGroup(long authorizationGroupId)
        {
            if (authorizationGroupId != 0)
            {
                authorizationGroupdata.DeleteAuthorizationGroup(authorizationGroupId);
            }
        }

        /// <summary>
        /// GetbyId authorizationGroup.
        /// </summary>
        /// <param name="authorizationGroupId"></param>
        /// <returns></returns>
        public AuthorizationGroup GetByIdAuthorizationGroup(long authorizationGroupId)
        {
            return authorizationGroupdata.GetByIdAuthorizationGroup(authorizationGroupId);
        }

        /// <summary>
        /// GetAll authorizationGroup.
        /// </summary>
        /// <returns></returns>
        public Collection<AuthorizationGroup> GetAllAuthorizationGroup()
        {
            return authorizationGroupdata.GetAllAuthorizationGroup();
        }
    }
}
